package com.itheima_01.monitest.third;

import java.util.Scanner;

public class TongJi_02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        float f=5.5f;
        int b = 0;//大字母
        int s = 0;//小字母
        int n = 0;//数字
        System.out.println("请输入：");
        cx: while (true) {
            String string = sc.nextLine();
            for (int i = 0; i < string.length(); i++) {
                if (string.charAt(i) >= 'A' && string.charAt(i) <= 'Z') {
                    b++;
                }
            }

            if (b != 0) {
                for (int i = 0; i < string.length(); i++) {
                    if (string.charAt(i) >= 'a' && string.charAt(i) <= 'z') {
                        s++;
                    }
                    if (string.charAt(i) >= '0' && string.charAt(i) <= '9') {
                        n++;
                    }
                }
                int o = string.length() - b - s - n;
                System.out.println("大写字母：" + b + "个");
                System.out.println("小写字母：" + s + "个");
                System.out.println("数字：" + n + "个");
                System.out.println("其他字符：" + o + "个");
                System.out.println(f);
                break cx;
            }else {
                System.out.println("请重新输入：");

            }

        }
    }
}
